<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>Introduction_to_Algorithms: IntroductionToAlgorithm::GraphAlgorithm::List&lt; NodeType &gt; Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Introduction_to_Algorithms
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">IntroductionToAlgorithm::GraphAlgorithm::List&lt; NodeType &gt; Struct Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>List：链表数据结构  
 <a href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a286b76ddec66a739312a2f5cef3ae544"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html#a286b76ddec66a739312a2f5cef3ae544">List</a> ()</td></tr>
<tr class="memdesc:a286b76ddec66a739312a2f5cef3ae544"><td class="mdescLeft">&#160;</td><td class="mdescRight">List默认构造函数  <a href="#a286b76ddec66a739312a2f5cef3ae544">More...</a><br /></td></tr>
<tr class="separator:a286b76ddec66a739312a2f5cef3ae544"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03267a13e44d42586d44460d04138cc1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html#a03267a13e44d42586d44460d04138cc1">add</a> (std::shared_ptr&lt; NodeType &gt; element)</td></tr>
<tr class="memdesc:a03267a13e44d42586d44460d04138cc1"><td class="mdescLeft">&#160;</td><td class="mdescRight">add:添加元素  <a href="#a03267a13e44d42586d44460d04138cc1">More...</a><br /></td></tr>
<tr class="separator:a03267a13e44d42586d44460d04138cc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd886aeac60fbdfa0290cafd7d67b718"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; NodeType &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html#abd886aeac60fbdfa0290cafd7d67b718">front_of</a> (std::shared_ptr&lt; NodeType &gt; element) const </td></tr>
<tr class="memdesc:abd886aeac60fbdfa0290cafd7d67b718"><td class="mdescLeft">&#160;</td><td class="mdescRight">front_of:链表指定元素前面的元素  <a href="#abd886aeac60fbdfa0290cafd7d67b718">More...</a><br /></td></tr>
<tr class="separator:abd886aeac60fbdfa0290cafd7d67b718"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a75e61d7a61923e5b185e1b4781d29f"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html#a7a75e61d7a61923e5b185e1b4781d29f">to_string</a> () const </td></tr>
<tr class="memdesc:a7a75e61d7a61923e5b185e1b4781d29f"><td class="mdescLeft">&#160;</td><td class="mdescRight">to_string：返回链表的字符串描述  <a href="#a7a75e61d7a61923e5b185e1b4781d29f">More...</a><br /></td></tr>
<tr class="separator:a7a75e61d7a61923e5b185e1b4781d29f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a78a07f79c1c8133b74f23ec794e0557e"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; NodeType &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html#a78a07f79c1c8133b74f23ec794e0557e">head</a></td></tr>
<tr class="separator:a78a07f79c1c8133b74f23ec794e0557e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad321a5c55f1f58c6054b7925ea007f89"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; NodeType &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html#ad321a5c55f1f58c6054b7925ea007f89">current</a></td></tr>
<tr class="separator:ad321a5c55f1f58c6054b7925ea007f89"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename NodeType&gt;<br />
struct IntroductionToAlgorithm::GraphAlgorithm::List&lt; NodeType &gt;</h3>

<p>List：链表数据结构 </p>
<p>链表包含两个数据成员：</p>
<ul>
<li>head：指向链表头部的元素的强指针</li>
<li>current:指向链表当前处理元素的强指针 </li>
</ul>

<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00037">37</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a286b76ddec66a739312a2f5cef3ae544"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename NodeType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html">IntroductionToAlgorithm::GraphAlgorithm::List</a>&lt; NodeType &gt;::<a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html">List</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>List默认构造函数 </p>
<p>默认构造函数完成两个设置：head设为空指针，current设为空指针 </p>

<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00048">48</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a03267a13e44d42586d44460d04138cc1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename NodeType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html">IntroductionToAlgorithm::GraphAlgorithm::List</a>&lt; NodeType &gt;::add </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; NodeType &gt;&#160;</td>
          <td class="paramname"><em>element</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>add:添加元素 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">element:被添加元素的强指针</td><td>若element为空指针则直接返回；否则将element添加到表头 </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00058">58</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>

</div>
</div>
<a class="anchor" id="abd886aeac60fbdfa0290cafd7d67b718"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename NodeType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;NodeType&gt; <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html">IntroductionToAlgorithm::GraphAlgorithm::List</a>&lt; NodeType &gt;::front_of </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; NodeType &gt;&#160;</td>
          <td class="paramname"><em>element</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>front_of:链表指定元素前面的元素 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">element:指定的元素</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>:指定元素前面元素的强指针</dd></dl>
<p>若element为空指针则抛出异常。否则遍历列表。若找到指定元素，则返回其前面元素的指针；若找不到指定元素， 则抛出异常 </p>

<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00081">81</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7a75e61d7a61923e5b185e1b4781d29f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename NodeType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html">IntroductionToAlgorithm::GraphAlgorithm::List</a>&lt; NodeType &gt;::to_string </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>to_string：返回链表的字符串描述 </p>
<dl class="section return"><dt>Returns</dt><dd>:链表的字符串描述</dd></dl>
<p>依次拼接各结点的字符串描述 </p>

<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00106">106</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ad321a5c55f1f58c6054b7925ea007f89"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename NodeType&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;NodeType&gt; <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html">IntroductionToAlgorithm::GraphAlgorithm::List</a>&lt; NodeType &gt;::current</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>指向链表当前处理元素的强指针 </p>

<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00040">40</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>

</div>
</div>
<a class="anchor" id="a78a07f79c1c8133b74f23ec794e0557e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename NodeType&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;NodeType&gt; <a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html">IntroductionToAlgorithm::GraphAlgorithm::List</a>&lt; NodeType &gt;::head</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>指向链表头部的元素的强指针 </p>

<p>Definition at line <a class="el" href="front__flow__vertex_8h_source.html#l00039">39</a> of file <a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>src/graph_algorithms/basic_graph/graph_representation/graph_vertex/<a class="el" href="front__flow__vertex_8h_source.html">front_flow_vertex.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_introduction_to_algorithm.html">IntroductionToAlgorithm</a></li><li class="navelem"><a class="el" href="namespace_introduction_to_algorithm_1_1_graph_algorithm.html">GraphAlgorithm</a></li><li class="navelem"><a class="el" href="struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_list.html">List</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.10 </li>
  </ul>
</div>
</body>
</html>
